﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;

namespace DGTestApp
{
    public interface IUserControlBase<D, O>
    {
        D DataObject { get; set; }
        O ParentDataObject { get; set; }
        BindingSource DataObjectList { get; set; }
        BindingSource ParentDataObjectList { get; set; }
        Billing.WindowsBase.eOpenMode OpenMode { get; set; }

        void Initialize(D dataObject, BindingSource dataObjectList, O parentObject, BindingSource parentDataObjectList);
        void Initialize(D dataObject, BindingSource dataObjectList, O parentObject);
        void Initialize(D dataObject, BindingSource dataObjectList);
        void Initialize(D dataObject);

        event EventHandler CurrentChanged;
        
        event CancelEventHandler BeforeSearch;
        event EventHandler AfterSearch;
        
        event CancelEventHandler BeforeSave;
        event EventHandler AfterSave;
        
        event CancelEventHandler BeforeCancel;
        event EventHandler AfterCancel;
        
        event CancelEventHandler CloseRequest;
    }
}
